package com.platform.gyf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value="test")
/**
 *
 * @author yuefeigu
 *
 */
public class PracticeController {
    @Value("${Spring-Cloud-Name}")
    private String name;
    /**
    
     * @param username
     * @return
     */
    @RequestMapping(value="/workname1/{workname}",method = RequestMethod.GET)
    public String userProfile(@PathVariable("workname") String workname) {
        System.out.println(name);
        return String.format("work %s", workname);
    }
    @RequestMapping(value="/workname2/{workname}",method = RequestMethod.GET)
    public String post(@PathVariable("workname") int workname) {
        return String.format("work %d", workname);
    }

}
